using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI.WebControls;
using btnet;

/// <summary>
/// Summary description for notifications
/// </summary>
public partial class notifications : System.Web.UI.Page
{
    protected DataSet ds;
    protected Security security;
    protected string ses;

    void Page_Load(Object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            String footer_label = null;
            if (Application["custom_footer"] != null)
            {
                footer_label = (String)Application["custom_footer"];
            }
            custom_footer_label.Text = footer_label;
        }

	    Util.do_not_cache(Response);
	
	    security = new Security();
	    security.check_security( HttpContext.Current, Security.MUST_BE_ADMIN);

	    titl.InnerText = Util.get_setting("AppTitle","BugTracker.NET") + " - "
		    + "queued notifications";

	    ds = btnet.DbUtil.get_dataset(
		    @"select
		    qn_id [id],
		    qn_date_created [date created],
		    qn_to [to],
		    qn_bug [bug],
		    qn_status [status],
		    qn_retries [retries],
		    qn_last_exception [last error]
		    from queued_notifications
		    order by id;");

	    ses = (string) Session["session_cookie"];
    }
}